package com.file;

import java.io.File;
import java.io.FileWriter;
import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;

public class FileDemo01 {

    public static void main(String[] args) throws Exception {


        RuntimeMXBean mxb2 = ManagementFactory.getRuntimeMXBean();
        System.out.println("FileDemo01 ===> " + mxb2.getName()); //2668@Sindrol-PC

        StringBuilder stringBuilder = new StringBuilder();
        for(int i = 0;i < 500000000; i++){
            stringBuilder.append("谭");
        }

        File file2 =  new File( "/Users/tanweihua/Desktop/multiwrite/qqq.txt");
        FileWriter writer2 = new FileWriter(file2);
        writer2.write(stringBuilder.toString());
//        writer2.flush();
        writer2.close();
    }
}
